package com.toycloud.business.dto.results;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;

/**
 * @author hlchan
 * @version 1.0
 * @date 2024/10/18 14:21
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ProductQualityAnalysis {
    private List<String> dateList;
    private List<TagData> tagsData;

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class TagData {
        private String tag;
        private Map<String, Integer> percentages;

        public TagData(String tag) {
            this.tag = tag;
            this.percentages = new TreeMap<>();
        }
    }
}
